import request from '@/config/axios'
/**
 * 分页查询
 */
export const pageQuery = (params) => {
  return request.get({ url: '/order/sales/page-query', params })
}

/**
 * 新增销售订单
 */
export const create = (data) => {
  return request.post({ url: '/order/sales/create', data })
}

/**
 * 更新销售订单
 */
export const update = (data) => {
  return request.put({ url: '/order/sales/update', data })
}

/**
 * 审核销售订单
 */
export const check = (data) => {
  return request.post({ url: '/order/sales/check', data })
}

/**
 * 获取单个销售订单
 */
export const singleGet = (id) => {
  return request.get({ url: '/order/sales/single-get?id=' + id })
}

/**
 * 取消销售订单
 */
export const cancel = (data) => {
  return request.post({ url: '/order/sales/cancel', data })
}
